import riskClient from "./riskClient";

// 获取系统菜单
export const queryAllMenus = async () => {
  return await riskClient.postAsync({
    url: 'api/permission/queryAllMenus',
  })
}

// 角色列表查询
export const querySecRoleMenuInfo = async ( params ) => {
  return await riskClient.postAsync({
    url: 'api/permission/querySecRoleMenuInfo',
    params,
  })
}

// 新增/编辑角色
export const saveOrUpdateSecRoleMenu = async ( params ) => {
  return await riskClient.postAsync({
    url: 'api/permission/saveOrUpdateSecRoleMenu',
    params,
  })
}

// 删除角色
export const deleteSecRoleInfo = async ( params ) => {
  return await riskClient.getAsync({
    url: 'api/permission/deleteSecRoleInfo',
    params,
    restfull: false
  })
}